Skip to content

Structured outputs evaluation blog with dottxt - release early next week #2021

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 30, 2024

Conversation

clefourrier
Copy link
Member

@clefourrier clefourrier commented Apr 19, 2024

Still need to port all images but ready for a light review

@clefourrier clefourrier changed the title Structured outputs evaluation blog with dottxt Structured outputs evaluation blog with dottxt - release Wednesday Apr 20, 2024
@clefourrier clefourrier requested a review from NathanHB April 23, 2024 19:32
@clefourrier clefourrier changed the title Structured outputs evaluation blog with dottxt - release Wednesday Structured outputs evaluation blog with dottxt - release a bit later Apr 23, 2024
@clefourrier clefourrier changed the title Structured outputs evaluation blog with dottxt - release a bit later Structured outputs evaluation blog with dottxt - release early next week Apr 23, 2024
Copy link
Member

@gante gante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool and insightful read 💛 I suspect this type of constraining can be very useful in a multitude of products!

I've added a few nits along the way 🤗


We can see in the regex that we allow the model to reason for anywhere from 200 to 700 character, then it must declare that “The answer is” and then replies with up to 10 digit number (that cannot start with 0).

It’s worth mentioning that the regex controlling the structure is similar, but not identical to, the regex used to parse out the answer. We’ve learned there’s an interesting bit of nuance in defining the structure since, like the prompt, it can impact performance. For example notice that `{200,700}` in the regex. This means that the model has 200 to 700 characters to “reason” before answering. Changing these values can impact performance and leads to something we refer to as “thought control”, an area we’re hoping to write more about soon.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question here: can't the model still generate "the answer is" in those 200-700 CoT characters?

Copy link
Member

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool! Noob question: do all models lend equally well to structured generation, or are there limitations in the technique?

@clefourrier clefourrier merged commit 7c90b77 into main Apr 30, 2024
@clefourrier clefourrier deleted the evaluation_dottxt_structured_outputs branch April 30, 2024 14:06
@clefourrier
Copy link
Member Author

@pcuenca we don't know yet - this blog is a bunch of preliminary experiments, and it would seem for now that this technique works well across models, but it needs to be confirmed :)

@clefourrier
Copy link
Member Author

Thank you all for your comments and useful feedback :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants